<template>
  <view>

    <StatusNav :properties="statusNavProperties"/>

    <uv-sticky :customNavHeight="stickyTop" :offsetTop="stickyTop">
      <!-- 轮播 -->
      <view v-if="swiperImgs.length>0" class="swiper">
        <uv-swiper
            :list="swiperImgs"
            keyName="image"
            showTitle
            imgMode="heightFix"
            radius="15"
            :title-style="{color:'red',textAlign: 'center'}"
            :autoplay="false"
            circular></uv-swiper>
        <!--        <swiper :indicator-dots="true" :autoplay="true"-->

        <!--                :interval="2*1000"-->
        <!--                indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff"-->
        <!--                :style="{-->
        <!--                           'border-radius': '10px'-->
        <!--                        }"-->
        <!--        >-->
        <!--          <block v-for="(item,index) in swiperImgs" :key="index">-->
        <!--            <swiper-item :style="{-->
        <!--                           'border-radius': '10px'-->
        <!--                        }">-->
        <!--              <navigator :url='item' class='slide-navigator acea-row row-between-wrapper'-->
        <!--                         hover-class='none'>-->
        <!--                <image-->
        <!--                    mode="widthFix"-->
        <!--                    :style="{-->
        <!--                           'border-radius': '10px'-->
        <!--                        }" :src="item" class="slide-image" :id="'slide-image'+index" lazy-load></image>-->
        <!--              </navigator>-->
        <!--            </swiper-item>-->
        <!--          </block>-->
        <!--        </swiper>-->
      </view>

      <view class="area">
        <view>
          <uv-icon name="map" size="15" custom-style="margin-right:5rpx"/>
        </view>
        <view style="display: flex;align-items: center">
          <view bindtap="changeCunli" class='text disc'>{{ schoolInfo.schoolName || '未选择' }}</view>
          <image @click="switchSchoolTab" style="width: 20px;height: 17px"
                 src="https://minio.thisforyou.cn:1443/test/往返 (1).png"></image>
        </view>
      </view>


      <!-- 通知 -->
      <view class="noticeBar" v-if="notice!==''&&notice!==null">
        <uv-notice-bar :text="notice"></uv-notice-bar>
      </view>

      <view class="tabs">
        <uv-tabs @change="tabOnChange" :current="tabActive" :lineColor="themConfig.theme.color" :list="product.typeList"></uv-tabs>
      </view>
    </uv-sticky>

    <view class="content-view">
      <view class="wrapper" v-if="product.list.length>0">
        <view @click="toDetail(item)" v-for="item in product.list "
              class="item">
          <view class="image">
            <uv-image width="100%" fit="widthFix"
                      :src="item.images[0]"/>
          </view>
          <view class="desc">
            <view>{{ item.productName }}</view>
            <!--            <view>{{ item.description }}</view>-->
            <view class="money-view">
              <view class="money">
                <text class="symbol">¥</text>
                <text class="mnoeyvalue" :style="{color:themConfig.theme.color}">{{ item.price }}</text>
              </view>

              <view class="view-count">
                {{ item.time }}
              </view>
              <view class="view-count">
                {{ item.viewCount }} 次浏览
              </view>
            </view>
            <view class="area-detail">
              {{ item.hamlet }}
            </view>
          </view>
        </view>
      </view>
      <view v-else>
        <Empty :show="true"/>
      </view>
    </view>


    <uv-load-more v-if="isReachBottom" @loadmore="loadmore" :status="loading.status" :loading-text="loading.loadingText"
                  :loadmore-text="loading.loadmoreText"
                  nomore-text=" "/>
    <uv-gap v-if="isReachBottom" height="5"></uv-gap>

    <!--    #ifdef H5-->
    <FloatingBtn size="35" :iconColor="themConfig.theme.color" jumpath="/pages/school/product-idle/add/index" icon="plus" background="white"
                 boxShadow="none"/>

    <FloatingBtn size="35"
                 :position="{bottom:'100px',right:'20px'}"
                 :iconColor="themConfig.theme.color"
                 jumpath="/pages/users/my-product/index" icon="https://minio.thisforyou.cn:1443/school/my-product-icon.png"
                 background="white"
                 boxShadow="none"/>

    <FloatingBackHome :position="{bottom:'150px',right:'20px'}"/>

    <!--    #endif-->

  </view>
</template>
<script>
import {mixins} from './index.js'

export default {
  components: {},
  mixins: [mixins]
}
</script>
<style scoped lang="scss">
@import './index.scss';

::v-deep .sku-item .uv-button {
  //padding: 30px !important;
  height: auto !important;
}
</style>
